#include "../inc/mzrtos.h"

static mz_tick_t tick = 0;

mz_tick_t mz_tick_get(void){
    return tick;
}

void mz_tick_beat(void){
    mz_thread_t thread;
    thread = mz_thread_self();

    ++ tick;
	
    -- thread->remaining_tick;
    if(thread->remaining_tick == 0){
        mz_thread_yield();
    }

//    mz_schedule();
}